package sk.upjs.ariadne.editor.data;

public class MapWall extends MapElement {

	private MapNode startPoint;

	private MapNode endPoint;
	
	public MapWall(MapNode startNode, MapNode endNode) {
		setWallPoints(startNode, endNode);
	}
	
	public MapNode getStartPoint() {
		return startPoint;
	}

	public MapNode getEndPoint() {
		return endPoint;
	}
	
	public void setWallPoints(MapNode startNode, MapNode endNode) {
		if ((startNode == null) || (endNode == null))
			throw new NullPointerException("Wall must have both endpoint.");
		
		this.startPoint = startNode;
		this.endPoint = endNode;
	}
}
